package cd.cdyb.sms.dto.expand;

import cd.cdyb.sms.dto.CompanyDto;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author lin
 * @since 2024-05-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class ExCompanyDto extends CompanyDto {

    @NotBlank(message = "公司名称不能为空")
    @Override
    public String getCompanyName() {
        return super.getCompanyName();
    }

    @NotBlank(message = "社会统一信用代码不能为空")
    @Override
    public String getCreditCode() {
        return super.getCreditCode();
    }

    @NotBlank(message = "手机号码不能为空")
    @Override
    public String getPhone() {
        return super.getPhone();
    }

    @NotBlank(message = "邮箱不能为空")
    @Override
    public @NotBlank(message = "邮箱不能为空") String getEmail() {
        return super.getEmail();
    }

    @NotBlank(message = "营业执照不能为空")
    @Override
    public String getLicense() {
        return super.getLicense();
    }

    @NotNull(message = "行业短信费用不能为空")
    @Override
    public BigDecimal getIndustryFee() {
        return super.getIndustryFee();
    }

    @NotNull(message = "营销短信费用不能为空")
    @Override
    public BigDecimal getMarketingFee() {
        return super.getMarketingFee();
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Override
    public Date getCreateTime() {
        return super.getCreateTime();
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Override
    public Date getUpdateTime() {
        return super.getUpdateTime();
    }
}
